package com.es.disped.dao.oj.mapper;

import com.es.disped.dao.oj.model.SourceCodeUser;
import com.es.disped.dao.oj.model.SourceCodeUserExample;
import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

//@CacheNamespace(implementation=(com.es.disped.dao.cache.RedisCache.class),size=512,flushInterval=60000)
public interface SourceCodeUserMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=SourceCodeUserSqlProvider.class, method="countByExample")
    long countByExample(SourceCodeUserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=SourceCodeUserSqlProvider.class, method="deleteByExample")
    int deleteByExample(SourceCodeUserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Delete({
        "delete from source_code_user",
        "where solution_id = #{solutionId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer solutionId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into source_code_user (solution_id, source)",
        "values (#{solutionId,jdbcType=INTEGER}, #{source,jdbcType=LONGVARCHAR})"
    })
    int insert(SourceCodeUser record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=SourceCodeUserSqlProvider.class, method="insertSelective")
    int insertSelective(SourceCodeUser record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=SourceCodeUserSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="solution_id", property="solutionId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="source", property="source", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<SourceCodeUser> selectByExampleWithBLOBs(SourceCodeUserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=SourceCodeUserSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="solution_id", property="solutionId", jdbcType=JdbcType.INTEGER, id=true)
    })
    List<SourceCodeUser> selectByExample(SourceCodeUserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Select({
        "select",
        "solution_id, source",
        "from source_code_user",
        "where solution_id = #{solutionId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="solution_id", property="solutionId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="source", property="source", jdbcType=JdbcType.LONGVARCHAR)
    })
    SourceCodeUser selectByPrimaryKey(Integer solutionId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=SourceCodeUserSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") SourceCodeUser record, @Param("example") SourceCodeUserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=SourceCodeUserSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") SourceCodeUser record, @Param("example") SourceCodeUserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=SourceCodeUserSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") SourceCodeUser record, @Param("example") SourceCodeUserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=SourceCodeUserSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(SourceCodeUser record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table source_code_user
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update source_code_user",
        "set source = #{source,jdbcType=LONGVARCHAR}",
        "where solution_id = #{solutionId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(SourceCodeUser record);
}